package com.spider.gk.common;

import java.util.HashMap;
import java.util.Map;

public class CopyOfContentAbstractForDetail {

	private String content;
	
	public CopyOfContentAbstractForDetail(String content){
		this.content = content;
	}
	
	public Map<String,String> process(){
		
		if(this.content!=null && this.content.length()>0){
			
			Map<String,String> result = new HashMap<String,String>();
			
			int shopIdIndex = content.indexOf("rstShopId");
			int shopIdIndexEnd = content.indexOf(",", shopIdIndex);
			
//			System.out.println(shopIdIndex);
//			System.out.println(shopIdIndexEnd);
			
			if(shopIdIndex>0 && shopIdIndexEnd>0){
				result.put("title","http://shop"+content.substring(shopIdIndex+10, shopIdIndexEnd)+".taobao.com");
				System.out.println(content.substring(shopIdIndex+10, shopIdIndexEnd));
			}
			return result;
			
		}
		
		return new HashMap<String ,String>();
	}
	
}
